package com.cloudlead.fleetAction.action;

import com.cloudlead.common.lang.annotation.Label;
import com.cloudlead.common.lang.persistence.EasyuiGridData;
import com.cloudlead.common.worker.action.impl.AbstractActionFactory;
import com.cloudlead.common.worker.annotation.Action;
import com.cloudlead.common.worker.annotation.Order;
import com.cloudlead.fleetAction.BusinessModules;
import com.cloudlead.fleetAction.service.CustomerBillSer;
import com.cloudlead.fleetService.CustomerBillService;
import com.cloudlead.fleetService.vo.CustomerBillRebVo;
import com.cloudlead.fleetService.vo.CustomerBillVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.validation.constraints.NotNull;

/**
 * Created by Will on 2015/12/24.
 */
@Controller
public class CustomerBillAcitonFactory extends AbstractActionFactory implements CustomerBillService {
    public CustomerBillAcitonFactory( ) {
        super(BusinessModules.CustomerBill);
    }
    @Autowired
    CustomerBillSer customerBillSer;
    @Override
    @Action
    @Order(1)
    @Label("账单查询")
    public CustomerBillRebVo findCustomerBill(CustomerBillVo customerBillVo,@NotNull @Label("每页记录条数")int rows,@NotNull @Label("页码")int page) {
/*        return new EasyuiGridData(customerBillSer.findAll(customerBillVo, rows, page),
                "id,baseFleetOrder.customerCo shortName,baseFleetOrder.bussinessCode bussinessCode,baseFleetOrder.packagingAddress packagingAddress,"
                +"baseFleetOrder.removeAddress removeAddress,costCode,costName,money,calculateCount,baseFleetOrder.createTime createTime"
        );*/
        return customerBillSer.findAll(customerBillVo, rows, page);
    }
}
